import * as echarts from 'echarts';

document.addEventListener('DOMContentLoaded', function(){
var chartDom = document.getElementById('main');
var myChart = echarts.init(chartDom);
var option;
option = {
  tooltip: {
    trigger: 'item'
  },
  legend: {
    orient: 'vertical',
    right: 'right'
  },
  series: [
    {
      name: 'Access From',
      type: 'pie',
      radius: '70%',
      data: [
        { value: 500, name: '定期检查' },
        { value: 600, name: '工程观察' },
        { value: 580, name: '日常检查' },
        { value: 300, name: '工程巡检' },
        { value: 300, name: '安全鉴定' },
        { value: 300, name: '安全检查' },
        { value: 300, name: '闸门试运行' },
        { value: 300, name: '自发维护' },
        { value: 300, name: '备用电源试运行' },
      ],
      emphasis: {
        itemStyle: {
          shadowBlur: 10,
          shadowOffsetX: 0,
          shadowColor: 'rgba(0, 0, 0, 0.5)'
        }
      }
    }
  ]
};

option && myChart.setOption(option);

})